package epam.com.study.xml.enums;

public class StringToEnum {

	public static TypeOfStonesEnum toTypeStone(String type) {
		switch (type) {
		case "jewel":
			return TypeOfStonesEnum.JEWEL;
		case "semijewel":
			return TypeOfStonesEnum.SEMIJEWEL;
		default:
			return null;
		}
	}

	public static ColorsEnum toColor(String type) {
		switch (type) {
		case "blue":
			return ColorsEnum.BLUE;
		case "green":
			return ColorsEnum.GREEN;
		case "red":
			return ColorsEnum.RED;
		default:
			return null;
		}
	}

	
}
